package com.ls.markt.model.admin;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

@NoArgsConstructor
@AllArgsConstructor
@Entity
@Data
@Builder
public class Player implements Serializable {

    private static final long serialVersionUID = 5116362634230614006L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ExcelProperty(value = "号码",index = 0)
    private int number;//号码

    @ExcelProperty(value = "姓名",index = 1)
    private String name;//名称

    @ExcelProperty(value = "生日",index = 2)
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date birthday;//生日

    @ExcelProperty(value = "国籍",index = 3)
    private String nat;//国籍

    @ExcelProperty(value = "俱乐部",index = 4)
    private Long club;//俱乐部

    @ExcelProperty(value = "身高",index = 5)
    private int height;//身高

    @ExcelProperty(value = "外援",index = 6)
    private Integer isForeigner;//外援

    @ExcelProperty(value = "国籍比赛次数",index = 7)
    private int internationalMatches;//国籍比赛次数

    @ExcelProperty(value = "身价",index = 8)
    private int marketValue;//身价 m-百万  k

//    private Date createTime;

//    private Date updateTime;

}
